From: Florian Müllner Date: Thu, 17 Oct 2019 21:29:06 +0000 (+0200) Subject: st: Remove st_get_align_factor() utility method X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~476 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=72af64d9646e89f5c6b60e86bb36c917b39562c0;p=gnome-shell.git st: Remove st_get_align_factor() utility method It is now unused. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803 --- diff --git a/src/st/st-widget.c b/src/st/st-widget.c index f7e308494..586954b46 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -3112,63 +3112,3 @@ st_widget_get_focus_chain (StWidget *widget) { return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget); } - -/** - * st_get_align_factors: - * @x_align: an #StAlign - * @y_align: an #StAlign - * @x_align_out: (out) (optional): @x_align as a #gdouble - * @y_align_out: (out) (optional): @y_align as a #gdouble - * - * Converts @x_align and @y_align to #gdouble values. - */ -void -st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out) -{ - if (x_align_out) - { - switch (x_align) - { - case ST_ALIGN_START: - *x_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *x_align_out = 0.5; - break; - - case ST_ALIGN_END: - *x_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } - - if (y_align_out) - { - switch (y_align) - { - case ST_ALIGN_START: - *y_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *y_align_out = 0.5; - break; - - case ST_ALIGN_END: - *y_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } -} diff --git a/src/st/st-widget.h b/src/st/st-widget.h index d6e3ca2bf..2f593e3d3 100644 --- a/src/st/st-widget.h +++ b/src/st/st-widget.h @@ -157,12 +157,6 @@ void st_widget_set_accessible_name (StWidget *widget, const gchar * st_widget_get_accessible_name (StWidget *widget); void st_widget_set_accessible (StWidget *widget, AtkObject *accessible); -/* utility methods */ -void st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out); - G_END_DECLS #endif /* __ST_WIDGET_H__ */